<div class="pane3-padding team-show">
  <div class="bc-div">
    <ul class="tracker-breadcrumbs">
      <li><%= link_to team.project.name, projects_path(team.project_id) %></li>
      <li> ></li>
      <%= team.code %>
    </ul>
    <div class="right">
    </div>
  </div>


  <div class="head-row team">
    <div class="right options">
      <% if can? :edit, team %>
          <a href="#" data-options="align:left" data-dropdown="drop1" class="dropdown right">
            <div class="icon settings-link"></div>
          </a>
          <ul id="drop1" data-dropdown-content class="f-dropdown">
            <li>
              <%= link_to "Edit", edit_team_path(team) %>
            </li>
            <li>
              <%= link_to "Delete", team_path(team),:method=>:delete,:confirm=>'Are you sure you want to delete this team?' %>
            </li>
          </ul>
      <% end %>
    </div>
    <div class="title">
      <div class="main-title"><%= team.name %></div>
    </div>
    <div class="description"><%= team.description %></div>
  </div>

  <div class="data-container">
    <dl class="tabs" data-tab  data-options="scroll_to_content: false">
      <dd class="active"><a href="#team-members">
        Members
        <div class="fig"><%= team.members_count %></div>
      </a></dd>
      <dd><a href="#team-leads">
        Leads
        <div class="fig"><%= team.managers_count %></div>
      </a></dd>
      <div class="right meta">
        Created on
        <div class="fig"><%= team.created_at.strftime('%d %B %Y') %></div>
      </div>

    </dl>
    <div class="tabs-content">
      <div class="content active" id="team-members">
        <% if can? :edit, team %>
            <%= link_to 'Add members', team_add_members_path(team), :remote => false, :class => 'dashed_link transition' %>
        <% end %>
        <%= render :partial => 'users/user_list', :locals => {:users => members.present? ? members : team.members} %>
      </div>
      <div class="content" id="team-leads">
        <%= render :partial => 'users/user_list', :locals => {:users => team_leads.present? ? team_leads : team.team_leads} %>
      </div>
    </div>
  </div>
</div>
<script type="text/javascript">
    $('.team-card').removeClass('active')
    $('.team-<%= team.id %>').addClass('active')
</script>
